#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int i = 0; int j = 0;
	int arr[10][10] = { 0 };
	arr[0][0] = 1;
	arr[1][0] = 1; arr[1][1] = 1;
	printf("%d\n%d %d\n", arr[0][0], arr[1][0], arr[1][1]);
	for (i = 2; i < 10; i++)
	{
		arr[i][0] = 1; arr[i][i] = 1;
		printf("%d ", arr[i][0]);
		for (j = 1; j <= i - 1; j++)
		{
			arr[i][j] = arr[i - 1][j - 1] + arr[i - 1][j];
			printf("%d ", arr[i][j]);
		}
		printf("%d\n", arr[i][i]);
	}
	return 0;
}